﻿<Window x:Class="SoftTeach.View.Noten.AddArbeitDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:resources="clr-namespace:SoftTeach.Resources" xmlns:softTeach="clr-namespace:SoftTeach"
        xmlns:noten="clr-namespace:SoftTeach.ViewModel.Noten" xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:controls="clr-namespace:SoftTeach.Resources.Controls"
        Title="Frage ..." 
        Height="250" 
        Width="520" 
        ResizeMode="NoResize" 
        WindowStyle="SingleBorderWindow">
  <Window.Resources>
    <ObjectDataProvider MethodName="GetValues"
                          ObjectType="{x:Type sys:Enum}"
                          x:Key="Bepunktungstypen">
      <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="noten:Bepunktungstyp" />
      </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>
  </Window.Resources>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <controls:SmallDialogHeader Grid.Row="0" Title="Bitte geben Sie hier Angaben zur Arbeit an."
                                      Icon="/SoftTeach;component/Images/Arbeit32.png"/>
    <StackPanel Grid.Row="1" Background="{x:Static SystemColors.MenuBarBrush}">
      <Grid Grid.Row="0">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="140"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="140"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Grid.Column="0">Bezeichnung</Label>
        <TextBox  Grid.Row="0" Grid.Column="1" Margin="3" Text="{Binding Path=Bezeichnung}"/>
        <Label Grid.Row="0" Grid.Column="2">Datum</Label>
        <DatePicker Grid.Row="0" Grid.Column="3"  Margin="3" SelectedDate="{Binding Path=Datum}"/>
        <Label Grid.Row="1" Grid.Column="0">Schuljahr</Label>
        <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
          <ComboBox Margin="3,3,0,3" Width="62"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Halbjahrtypen}" 
                SelectedItem="{Binding Path=Halbjahrtyp}"
                DisplayMemberPath="HalbjahrtypBezeichnung"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}" 
                HorizontalAlignment="Left"/>
          <ComboBox Margin="0,3,3,3" Width="72"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Jahrtypen}" 
                SelectedItem="{Binding Path=Jahrtyp}"
                DisplayMemberPath="JahrtypBezeichnung"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                HorizontalAlignment="Left"/>
        </StackPanel>
        <StackPanel  Grid.Row="1" Grid.Column="2" Orientation="Horizontal">
         </StackPanel>
        <CheckBox  Grid.Row="1" Grid.Column="3" Margin="3" TabIndex="1" Content="Klassenarbeit"
                    IsChecked="{Binding Path=IstKlausur}"/>
        <Label  Grid.Row="2" Grid.Column="0">Fach</Label>
        <ComboBox  Grid.Row="2" Grid.Column="1" Margin="3" Width="134"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Fächer}" 
                SelectedItem="{Binding Path=Fach}"
                DisplayMemberPath="FachBezeichnung"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                HorizontalAlignment="Left"/>
        <Label Grid.Row="2" Grid.Column="2">Klasse</Label>
        <ComboBox Grid.Row="2" Grid.Column="3" Margin="3" Width="134"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Klassen}" 
                SelectedItem="{Binding Path=Klasse}"
                DisplayMemberPath="KlasseBezeichnung"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                HorizontalAlignment="Left"/>
        <Label  Grid.Row="3" Grid.Column="0">Bewertungsschema</Label>
        <ComboBox  Grid.Row="3" Grid.Column="1" Margin="3" Width="134"
                ItemsSource="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=Bewertungsschemata}" 
                SelectedItem="{Binding Path=Bewertungsschema}"
                DisplayMemberPath="BewertungsschemaBezeichnung"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}"
                HorizontalAlignment="Left"/>
        <Label  Grid.Row="3" Grid.Column="2">Bepunktungstyp</Label>
        <ComboBox  Grid.Row="3" Grid.Column="3" Margin="3" TabIndex="1" Name="ComboBepunktungstyp"
                ItemsSource="{Binding Source={StaticResource Bepunktungstypen}}" 
                SelectedItem="{Binding Path=Bepunktungstyp}"
                Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}" Width="134"
                  HorizontalAlignment="Left"/>
      </Grid>
    </StackPanel>
    <Grid Background="{StaticResource DefaultButtonsBackgroundBrush}" Grid.Row="2">
      <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
        <Button Width="100" HorizontalAlignment="Right" IsDefault="True" Click="OkClick" TabIndex="2">OK</Button>
        <Button Width="100" Margin="5,0,0,0" HorizontalAlignment="Right" IsCancel="True" Click="CancelClick" TabIndex="3">Abbruch</Button>
      </StackPanel>
    </Grid>
  </Grid>
</Window>
